Skip to content

Switch CI to self-hosted runners and parallelize tests to fix TF CPU timeouts - #2856

Merged
laxmareddyp merged 2 commits into
keras-team:masterfrom
laxmareddyp:fix_tf_cpu_timeouts
Jul 23, 2026
Merged

Switch CI to self-hosted runners and parallelize tests to fix TF CPU timeouts#2856
laxmareddyp merged 2 commits into
keras-team:masterfrom
laxmareddyp:fix_tf_cpu_timeouts

Conversation

@laxmareddyp

@laxmareddyp laxmareddyp commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Description of the change

The Test the code (tensorflow, keras-stable) job has been consistently timing out on GitHub Actions, running 6+ hours without completing on every PR and master, while JAX and Torch finish in 80-90 minutes.

Root Cause

TF eager mode on CPU is significantly slower for the repeated model instantiation pattern in KerasHub tests
Test suite has grown ~80 model families, all running sequentially on a 2-core ubuntu-latest runner
No timeout-minutes was set, so jobs run the full 6-hour GitHub default before being killed

Checklist

  • I have added all the necessary unit tests for my change.
  • I have verified that my change does not break existing code and works with all backends (TensorFlow, JAX, and PyTorch).
  • My PR is based on the latest changes of the main branch (if unsure, rebase the code).
  • I have followed the Keras Hub Model contribution guidelines in making these changes.
  • I have followed the Keras Hub API design guidelines in making these changes.
  • I have signed the Contributor License Agreement.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds pytest-xdist to the common requirements file (requirements-common.txt) to support parallel test execution. There are no review comments, and I have no feedback to provide.

@hertschuh hertschuh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@laxmareddyp
laxmareddyp merged commit f0006d8 into keras-team:master Jul 23, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants